package com.cxh.controller.Thread;


public class MyThread implements Runnable{
	public static long num = 1;
	private long beginTime;

	@Override
	public void run() {
		println();
	}

	public void println(){
		if(num==1l){
			beginTime = System.currentTimeMillis();
		}
		
		for (long i = 0; i <= 10000000l; i++) {
			if(num <= 10000000l){
				num++;
			}
			if(num ==(10000000l)){
				long endTime = System.currentTimeMillis();
				System.out.println("多线程执行时间====="+(endTime - beginTime));
			}
		}
		
		
	}
}
